home *** CD-ROM | disk | FTP | other *** search
/ MacTest Pro 1999 February / MacTestPro-Feb1999.iso / Utilities / Printer Utilities / Color StyleWriter 4500⁄6500 / HexConvert Folder / About Hex Converter next >
Encoding:
Text File  |  1995-11-30  |  2.6 KB  |  62 lines  |  [TEXT/ttxt]

  1. HexCnv 1.0
  2. __________
  3.  
  4.  
  5. Hex Converter (HexCnv) converts between decimal and hexadecimal representations
  6. of integers. If you type in the decimal box (D:) and hit Convert (or just press
  7. Return or Enter) you get the hex representation, and conversely if you type in
  8. the hex box (H:).
  9.  
  10. There are two sets of options:
  11.  
  12. The check box with the minus sign tells HexCnv whether you want the decimal
  13. representation of a hex number to be signed, if appropriate. It has no effect
  14. going from decimal to hex.
  15.  
  16. The radio buttons tell HexCnv what size of hex number you want (in bits). The
  17. representation will be padded with leading zeroes or sign-extended with leading
  18. F's if necessary. If the number is too large for the size, the most significant
  19. byte(s) will be represented. These settings also affect how numbers are
  20. translated into decimal if the Signed box is checked. For instance, "FF" with
  21. Signed turned on will translate into -1 in 8-bit mode, but 255 in 16-bit mode.
  22. Numbers won't be signed if they're too big for the mode: for instance, hex
  23. "100" in 8-bit mode gets translated as 256.
  24.  
  25. In the decimal box, you can enter a comma-separated list of numbers. Each gets
  26. translated according to the size settings, and the translations are
  27. concatenated to produce a single hex number. For instance, in 8-bit mode, the
  28. list "255, 0, 255" will give hex "FF00FF".
  29.  
  30. A useful trick is to take values from the Color Picker, enter (or paste) them
  31. into the decimal box, set the size to 8-bit, and you get an appropriate
  32. six-digit hex number for HTML backgrounds, etc.
  33.  
  34. PS: This works particularly well with Mike Tilstra's GetColor FKEY, which lets
  35. you select a colour from anywhere on the screen, presents the Color Picker, and
  36. places the RGB values on the ClipBoard. Just paste them with Command-V into Hex
  37. Converter, hit return, use the tab to move into the Hex box, copy with
  38. Command-C, and you have your hex string ready to paste into a document.
  39. GetColor FKEY is available at UMich and other sites, and also off my page (see
  40. below).
  41.  
  42. Bugs
  43.  
  44. Hex Converter currently uses the Macintosh Toolbox routines NumToString and
  45. StringToNum for conversions into and out of decimal. This means:
  46.  
  47. (a) there is no error checking on decimal numbers;
  48. (b) you can have leading spaces, but _not_ before the minus sign;
  49. (c) you can't have unsigned 32-bit numbers.
  50.  
  51. A future version of Hex Converter will probably replace these calls with custom
  52. routines, but that's how it is for now. The hex conversion routines are custom
  53. written and better behaved.
  54.  
  55. Freeware.
  56.  
  57. Jason Johnston
  58. <jcj@extro.ucc.su.oz.au>
  59. <http://www.usyd.edu.au/~jcj/>
  60.  
  61. November 1995
  62.